package com.test.nnooolwdeaer.activity_fragment_wooden.base_wooden;

import android.net.Uri;

import com.test.nnooolwdeaer.activity_fragment_wooden.loan_wooden.LoanApplyActivity_wooden;
import com.test.nnooolwdeaer.bean_wooden.StaticVariate_wooden;
import com.test.nnooolwdeaer.bean_wooden.process_wooden.ProcessInfo_wooden;
import com.test.nnooolwdeaer.constant_wooden.Constant_wooden;
import com.test.nnooolwdeaer.util_wooden.http_wooden.HttpManager_wooden;
import com.test.nnooolwdeaer.activity_fragment_wooden.info_wooden.BindBankAccountActivity_Cote_wooden;
import com.test.nnooolwdeaer.activity_fragment_wooden.info_wooden.InfoUploadActivity_wooden;


public abstract class BaseInfoActivity_wooden extends BaseActivity_wooden {

    public Uri photoUri;

    public void onInfoUploadResponse_wooden(){
        HttpManager_wooden.getInstance_wooden().requestUserProcess_wooden();
    }

    @Override
    public void onUserProcessResponse_wooden() {

        //科特的绑卡环节
        if (StaticVariate_wooden.Select_Country_wooden.equalsIgnoreCase(Constant_wooden.Country_Cote_wooden)&&
                ProcessInfo_wooden.getInstance_wooden().getStepName_wooden(0).equalsIgnoreCase("account_info")){
            startActivity_wooden(BindBankAccountActivity_Cote_wooden.class);
        }else

        if (ProcessInfo_wooden.getInstance_wooden().getStepsSize_wooden()>0){
            startActivity_wooden(InfoUploadActivity_wooden.class);
        }else

        //越南额外流程
        if (StaticVariate_wooden.Select_Country_wooden.equalsIgnoreCase(Constant_wooden.Country_Vietnam_wooden)&&ProcessInfo_wooden.getInstance_wooden().getExtStep().size()>0){
            handleVietnamExtProcess();
        } else {
            //如果不是处理还款流程、状态流程、认证流程，直接去借款确认页
            startActivity_wooden(LoanApplyActivity_wooden.class);
            HttpManager_wooden.getInstance_wooden().requestLoanApplyDetail_wooden();
        }

        finish();

    }

    public void onLoanApplyDetailResponse_wooden(){
        startActivity_wooden(LoanApplyActivity_wooden.class);
    }

}
